import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {// 首页
      path: '/',
      name: 'Home',
      component: () => import('@/pages/home/Home')
    }, {// 绑定QQ页面
      path: '/bindqq/',
      name: 'BindQQ',
      component: () => import('@/pages/bindqq/BindQQ')
    }, {// 新建文章
      path: '/article/add/',
      name: 'addArticle',
      component: () => import('@/pages/article/edit/edit')
    }, {// 发布文章成功
      path: '/article/published/',
      name: 'published',
      component: () => import('@/pages/article/edit/published')
    }, {// 更新文章
      path: '/article/update/:id',
      name: 'updateArticle',
      component: () => import('@/pages/article/edit/edit')
    }, {// 文章页
      path: '/article/:id',
      name: 'article',
      component: () => import('@/pages/article/page/article')
    }, {
      path: '*',
      name: '404',
      component: () => import('@/components/404')
    }
  ]
})
